/*
 * @Author: Dorange.Wang
 * @Date: 2021-07-09 10:09:22
 * @LastEditors: your name
 * @LastEditTime: 2021-07-19 16:08:48
 * @Description: file content
 */
const widgetMixin = {
  props: {
    instance: {
      // 组件实例
      type: Object,
      default: () => ({}),
    },
    values: {
      // 页面数据
      type: Object,
      default: () => ({}),
    },
    valueCallback: {
      // 变更数据的方法，由顶级定义
      type: Function,
      default: () => ({}),
    },
  },

  computed: {
    field() {
      // 组件字段对应的key
      return this.instance.modelName;
    },
  },
};

export { widgetMixin };
